{% extends "base_tables.html" %}

{% block content_title %}{{ dataset.base_name }}{% endblock %}

{% block content %}
  <table class="table table-striped">
    <tbody>
      <tr>
        <th>Sqlite 版本</th>
        <td>{{ sqlite.sqlite_version }}</td>
      </tr>
      <tr>
        <th>文件名称</th>
        <td>{{ dataset.filename }}
          {% if dataset.is_readonly %}<strong>read-only</strong>{% endif %}
        </td>
      </tr>
      <tr>
        <th>大小</th>
        <td>{{ dataset.size_on_disk|filesizeformat }}</td>
      </tr>
      <tr>
        <th>创建时间</th>
        <td>{{ dataset.created.strftime('%Y年%m月%d日 %H:%M:%S') }}</td>
      </tr>
      <tr>
        <th>修改时间</th>
        <td>{{ dataset.modified.strftime('%Y年%m月%d日 %H:%M:%S') }}</td>
      </tr>
      <tr>
        <th>数据表数</th>
        <td>{{ dataset.tables|length }}</td>
      </tr>
      <tr>
        <th>索引数</th>
        <td>{{ dataset.get_all_indexes()|length }}</td>
      </tr>
      <tr>
        <th>触发数</th>
        <td>{{ dataset.get_all_triggers()|length }}</td>
      </tr>
      <tr>
        <th>视图数</th>
        <td>{{ dataset.get_all_views()|length }}</td>
      </tr>
    </tbody>
  </table>
{% endblock %}
